Skip to content

Latest commit

 

History

History
136 lines (95 loc) · 4.53 KB

nc-parallel-pparallel_try_allocate_routine.md

File metadata and controls

136 lines (95 loc) · 4.53 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NC:parallel.PPARALLEL_TRY_ALLOCATE_ROUTINE
PPARALLEL_TRY_ALLOCATE_ROUTINE (parallel.h)
The PPARALLEL_TRY_ALLOCATE_ROUTINE-typed (ISR) callback routine attempts to allocate a parallel port at IRQL = DIRQL. The system-supplied function driver for parallel ports supplies this routine.
parports\parallel_try_allocate_routine__isr_.htm
parports
02/15/2018
PPARALLEL_TRY_ALLOCATE_ROUTINE callback
PPARALLEL_TRY_ALLOCATE_ROUTINE, ParallelTryAllocateRoutine, ParallelTryAllocateRoutine callback function [Parallel Ports], cisspd_737cb583-bcc9-46e9-915b-e073da2c11bf.xml, parallel/ParallelTryAllocateRoutine, parports.parallel_try_allocate_routine__isr_
parallel.h
Parallel.h
Desktop
DIRQL
Windows
RILGBATOKEN, *LPRILGBATOKEN
PPARALLEL_TRY_ALLOCATE_ROUTINE
parallel/PPARALLEL_TRY_ALLOCATE_ROUTINE
APIRef
kbSyntax
UserDefined
parallel.h
PPARALLEL_TRY_ALLOCATE_ROUTINE

PPARALLEL_TRY_ALLOCATE_ROUTINE callback

-description

The PPARALLEL_TRY_ALLOCATE_ROUTINE-typed (ISR) callback routine attempts to allocate a parallel port at IRQL = DIRQL. The system-supplied function driver for parallel ports supplies this routine.

-parameters

-param TryAllocateContext [in]

Pointer to the device extension of a functional device object that represents a parallel port.

-returns

Return code Description
TRUE
The parallel port was allocated.
FALSE
The parallel port was not allocated.

-prototype

typedef BOOLEAN ParallelTryAllocateRoutine(
  _In_ PVOID TryAllocateContext
);

-remarks

A kernel-mode driver connects an interrupt service routine by using an IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT, which returns a PARALLEL_INTERRUPT_INFORMATION structure. This structure includes the TryAllocatePortAtInterruptLevel member, which is a pointer to the system-supplied PPARALLEL_TRY_ALLOCATE_ROUTINE (ISR) callback.

The PPARALLEL_TRY_ALLOCATE_ROUTINE (ISR) callback is nonblocking, does not queue an allocate request, and returns immediately.

A driver uses the PPARALLEL_TRY_ALLOCATE_ROUTINE (ISR) callback in conjunction with a driver-supplied ISR. If the driver does not have a parallel port allocated when the driver's ISR is called, the driver can use this callback.

For more information about allocating a parallel port in an ISR, see Connecting an Interrupt Service Routine to a ParallelPort.

Note   The PPARALLEL_TRY_ALLOCATE_ROUTINE (ISR) callback is untested. Microsoft does not recommend using a client-supplied interrupt routine. The use of interrupts might cause system instability. By default, the IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT request is disabled.
 

-see-also

IOCTL_INTERNAL_PARALLEL_DISCONNECT_INTERRUPT

IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO

IOCTL_INTERNAL_PARALLEL_PORT_ALLOCATE

IOCTL_INTERNAL_PARALLEL_CONNECT_INTERRUPT

IOCTL_INTERNAL_PARALLEL_PORT_FREE

PPARALLEL_FREE_ROUTINE (ISR)

PARALLEL_INTERRUPT_INFORMATION